// out: ../one-light.css, compress: true, sourceMap: false

// Modified according to: 
//     https://github.com/atom/one-light-syntax/

// Config -----------------------------------
@syntax-hue:          230;
@syntax-saturation:    1%;
@syntax-brightness:   98%;


// Monochrome -----------------------------------
@mono-1: hsl(@syntax-hue, 8%, 24%);
@mono-2: hsl(@syntax-hue, 6%, 44%);
@mono-3: hsl(@syntax-hue, 4%, 64%);

// Colors -----------------------------------
@hue-1:   hsl(198, 99%, 37%); // <-cyan
@hue-2:   hsl(221, 87%, 60%); // <-blue
@hue-3:   hsl(301, 63%, 40%); // <-purple
@hue-4:   hsl(119, 34%, 47%); // <-green

@hue-5:   hsl(  5, 74%, 59%); // <-red 1
@hue-5-2: hsl(344, 84%, 43%); // <-red 2

@hue-6:   hsl(41, 99%, 30%); // <-orange 1
@hue-6-2: hsl(41, 99%, 38%); // <-orange 2


// Base colors -----------------------------------
@syntax-fg:     @mono-1;
@syntax-bg:     hsl(@syntax-hue, @syntax-saturation, @syntax-brightness);
@syntax-gutter: darken(@syntax-bg, 36%);
@syntax-guide:  fade(@syntax-fg, 20%);
@syntax-accent: hsl(@syntax-hue, 100%, 66% );

// Official Syntax Variables -----------------------------------

// General colors
@syntax-text-color:            @syntax-fg;
@syntax-cursor-color:          @syntax-accent;
@syntax-selection-color:       darken(@syntax-bg, 8%);
@syntax-selection-flash-color: @syntax-accent;
@syntax-background-color:      @syntax-bg;

// Guide colors
@syntax-wrap-guide-color:          @syntax-guide;
@syntax-indent-guide-color:        @syntax-guide;
@syntax-invisible-character-color: @syntax-guide;

// For find and replace markers
@syntax-result-marker-color:          fade(@syntax-accent, 20%);
@syntax-result-marker-color-selected: @syntax-accent;

// Gutter colors -----------------------------------
@syntax-gutter-text-color:                @syntax-gutter;
@syntax-gutter-text-color-selected:       @syntax-fg;
@syntax-gutter-background-color:          @syntax-bg; // unused
@syntax-gutter-background-color-selected: darken(@syntax-bg, 3%);

// Git colors - For git diff info. i.e. in the gutter
@syntax-color-renamed:  hsl(208, 100%, 66%);
@syntax-color-added:    hsl(132,  60%, 44%);
@syntax-color-modified: hsl( 40,  90%, 50%);
@syntax-color-removed:  hsl(  0, 100%, 54%);

// For language entity colors
@syntax-color-variable:   @hue-5;
@syntax-color-constant:   @hue-6;
@syntax-color-property:   @syntax-fg;
@syntax-color-value:      @syntax-fg;
@syntax-color-function:   @hue-2;
@syntax-color-method:     @hue-2;
@syntax-color-class:      @hue-6-2;
@syntax-color-keyword:    @hue-3;
@syntax-color-tag:        @hue-5;
@syntax-color-attribute:  @hue-6;
@syntax-color-import:     @hue-3;
@syntax-color-snippet:    @hue-4;


// Custom Syntax Variables -----------------------------------
// Don't use in packages

@syntax-cursor-line: fade(@syntax-fg, 5%); // needs to be semi-transparent to show search results

@syntax-deprecated-fg: darken(@syntax-color-modified, 50%);
@syntax-deprecated-bg: @syntax-color-modified;
@syntax-illegal-fg:    white;
@syntax-illegal-bg:    @syntax-color-removed;

pre {
  font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
  direction: ltr;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
  word-break: normal;
  
  padding: 1em;
  margin: .5em 0;
  
  overflow: auto;
  line-height: 1.5;
  tab-size: 4;
  hyphens: none;
  color: @syntax-text-color;
  background-color: contrast(@syntax-background-color, lighten(@syntax-background-color, 4%), darken(@syntax-background-color, 6%)) !important;
  border: contrast(@syntax-background-color, lighten(@syntax-background-color, 16%), darken(@syntax-background-color, 16%));
  border-radius: 3px;
}

pre[class*="language-"] { // presentation mode padding
  padding: 1em; 
}

code[class*="language-"],
pre[class*="language-"] {
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: @mono-3;
}

/*
.token.punctuation {
  color: #96CBFE;
}
*/

.namespace {
	opacity: .7;
}


.token.constant {
  color: @hue-6;
}

/*
.token.property {
}
*/

.token.boolean,
.token.number,
.token.function-name {
  color: @hue-6;
}

.token.tag {
  color: @hue-5;
}

/*
.token.deleted {
}

.token.inserted {
}
*/

.token.symbol {
  color: @hue-1;
}

.token.selector {
  color: @hue-3;
}

.token.attr-name { // .attribute-name
  color: @hue-6;
}

.token.string {
  color: @hue-4;
}

.token.char {
  color: @hue-1;
}

/*
.token.builtin {
  color: @green;
}

.token.entity {
  color: #FFD2A7;
}
*/

.token.url { // link
  color: @hue-1;
}

.token.operator {
  color: @mono-1;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: @hue-3;
}

.token.function {
  color: @hue-2;
}

.token.class-name {
  color: @hue-6-2;
}

.token.variable {
  color: @hue-6;
}

.token.regex {
  color: @hue-1;
}

.token.important {
  color: @hue-5;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}

/*
&.line-numbers {
  .line-numbers-rows>span:before {
  }
}
*/
}

/* highlight */
pre[data-line] {
  position: relative;
  padding: 1em 0 1em 3em;
}
pre[data-line] .line-highlight-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
  display: block;
  width: 100%;
}

pre[data-line] .line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: inherit 0;
  margin-top: 1em;
  background: hsla(24, 20%, 50%,.08);
  background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

pre[data-line] .line-highlight:before, 
pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-start);
  position: absolute;
  top: .4em;
  left: .6em;
  min-width: 1em;
  padding: 0 .5em;
  background-color: hsla(24, 20%, 50%,.4);
  color: hsl(24, 20%, 95%);
  font: bold 65%/1.5 sans-serif;
  text-align: center;
  vertical-align: .3em;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 1px white;
}

pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-end);
  top: auto;
  bottom: .4em;
}